Prefetching tracks using multiple caches

ABSTRACT

Provided are a computer program product, sequential access storage device, and method for managing data in a sequential access storage device receiving read requests and write requests from a system with respect to tracks stored in a sequential access storage medium. A prefetch request indicates prefetch tracks in the sequential access storage medium to read from the sequential access storage medium. The accessed prefetch tracks are cached in a non-volatile storage device integrated with the sequential access storage device, wherein the non-volatile storage device is a faster access device than the sequential access storage medium. A read request is received for the prefetch tracks following the caching of the prefetch tracks, wherein the prefetch request is designated to be processed at a lower priority than the read request with respect to the sequential access storage medium. The prefetch tracks are returned from the non-volatile storage device to the read request.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a computer program product, system, andmethod for prefetching tracks using multiple caches.

2. Description of the Related Art

A cache management system buffers tracks in a storage device recentlyaccessed as a result of read and write operations in a faster accessstorage device, such as memory, than the storage device storing therequested tracks. Subsequent read requests to tracks in the fasteraccess cache memory are returned at a faster rate than returning therequested tracks from the slower access storage, thus reducing readlatency. The cache management system may also return complete to a writerequest when the modified track directed to the storage device iswritten to the cache memory and before the modified track is written outto the storage device, such as a hard disk drive. The write latency tothe storage device is typically significantly longer than the latency towrite to a cache memory. Thus, using cache also reduces write latency.

A cache management system may maintain a linked list having one entryfor each track stored in the cache, which may comprise write databuffered in cache before writing to the storage device or read data. Inthe commonly used Least Recently Used (LRU) cache technique, if a trackin the cache is accessed, i.e., a cache “hit”, then the entry in the LRUlist for the accessed track is moved to a Most Recently Used (MRU) endof the list. If the requested track is not in the cache, i.e., a cachemiss, then the track in the cache whose entry is at the LRU end of thelist may be removed (or destaged back to storage) and an entry for thetrack data staged into cache from the storage is added to the MRU end ofthe LRU list. With this LRU cache technique, tracks that are morefrequently accessed are likely to remain in cache, while data lessfrequently accessed will more likely be removed from the LRU end of thelist to make room in cache for newly accessed tracks.

The LRU cache technique seeks to optimize for temporal locality so as todestage tracks that are least likely to be rewritten soon in order tominimize the number of destage operations, i.e., if a write that is notdestaged is overwritten than the destaging of the overwritten write isavoided, thus saving the time and effort of writing the data from cacheto disk. On the other hand there is also a desire to destage in a mannerthat exploits spatial locality, which means that data is written tostorage locations that are closest to each other to minimize thedistance the storage device write mechanism and storage media needs tobe moved to reach the next storage location to write.

One technique for exploiting both temporal and spatial locality is theWise Ordering for Writes (WOW) algorithm. The WOW algorithm employs acircular linked list or clock where the circular linked list has oneentry for each write request buffered in cache. The entries are orderedin the linked list according to the storage location to which theassociated write request is directed to exploit the benefits of spatiallocality. Further, each entry includes a bit indicating whether thewrite data for the storage location in the cache has been recentlyupdated. The bit for an entry is set when the write data for the entryis updated. A pointer points to a current entry in the circular linkedlist. A task using the WOW algorithm accesses an entry addressed by thepointer. If the bit for the entry indicates that the data for the entryin cache has been recently updated, then the bit is set to indicate thatthe write data has not been recently updated and the pointer incrementedto point to the next entry so that the entry having write data to astorage location next closest in spatial proximity to the previouslywritten storage location is considered. The entry is selected to writethat is closest in spatial proximity to the last written storagelocation and whose bit indicates that the write data for the entry hasnot recently been updated.

Thus, with the WOW algorithm, spatial locality is exploited because anext entry to write is selected for consideration that is closest inspatial proximity to the last destaged write request. Further, temporallocality is exploited because an entry that has recently been writtenwill be skipped until the pointer circles back to that skipped entry toconsider.

Disk drives may implement the WOW algorithm and other algorithms thattake both the linear and the angular position of the write tracks intoaccount and optimize for both with respect to a current write headposition to determine the minimal total service time. This process isreferred to as “command re-ordering based on seek and rotationaloptimization”. The disk drive logic boards will analyze write requestsand determine which to do first based on both how much time will berequired to seek to the various cylinders and angular position of thetrack to write, and how much time will elapse waiting for the data torotate under the heads.

There is a need in the art for improved techniques for using cache in astorage system.

SUMMARY

Provided are a computer program product, sequential access storagedevice, and method for managing data in a sequential access storagedevice receiving read requests and write requests from a system withrespect to tracks stored in a sequential access storage medium. Aprefetch request is received from the system indicating prefetch tracksin the sequential access storage medium and processed to read theprefetch tracks from the sequential access storage medium. The accessedprefetch tracks are cached in a non-volatile storage device integratedwith the sequential access storage device, wherein the non-volatilestorage device is a faster access device than the sequential accessstorage medium. A read request is received for the prefetch tracksfollowing the caching of the prefetch tracks, wherein the prefetchrequest is designated to be processed at a lower priority than the readrequest with respect to the sequential access storage medium. Theprefetch tracks are returned from the non-volatile storage device to theread request.

Provided are a computer program product, system, and method forrequesting data from a sequential access storage device. A prefetchrequest is sent to the sequential access storage device to prefetchtracks in the sequential access storage device to a second cache device,wherein the prefetch request is designated to be processed in thesequential access storage device at a first priority. A read request isgenerated to read the prefetch tracks following the sending of theprefetch request, wherein the read request is designated to be processedat a second priority at the sequential access storage device, whereinthe first priority has a lower priority processing in the sequentialaccess storage device than the higher priority. The read tracks returnedto the read request from the second cache device are stored in a firstcache device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an embodiment of a computing environment.

FIG. 2 illustrates an embodiment of first cache management information.

FIG. 3 illustrates an embodiment of second cache management information.

FIG. 4 illustrates an embodiment of a sequential access storage device.

FIG. 5 illustrates an embodiment of a first cache control block.

FIG. 6 illustrates an embodiment of a second cache control block.

FIG. 7 illustrates an embodiment of a non-volatile storage cache controlblock.

FIG. 8 illustrates an embodiment of a spatial index entry.

FIG. 9 illustrates an embodiment of operations to determine whether toremove tracks in the first cache to free space for tracks to add to thefirst cache.

FIG. 10 illustrates an embodiment of operations to free space in thefirst cache.

FIG. 11 illustrates an embodiment of operations to add a track to thefirst cache.

FIG. 12 illustrates an embodiment of operations to promote a track tothe second cache.

FIG. 13 illustrates an embodiment of operations to free space in thesecond cache.

FIG. 14 illustrates an embodiment of operations to process a readrequest for requested tracks.

FIG. 15 illustrates an embodiment of operations at the sequential accessstorage device to process a write request.

FIG. 16 illustrates an embodiment of operations at the sequential accessstorage device to process a read request.

FIG. 17 illustrates an embodiment of operations at the sequential accessstorage device to process the request queue and the priority read queue.

FIG. 18 illustrates an embodiment of operations at the sequential accessstorage device to process the request queue.

FIGS. 19 and 22 illustrate embodiments of operations to initiate anoperation to prefetch tracks.

FIG. 20 illustrates an embodiment of a prefetch request.

FIGS. 21 and 23 illustrate embodiments of operations to access prefetchtracks.

FIG. 24 illustrates an embodiment of operations at the sequential accessstorage device to process a received prefetch request.

FIG. 25 illustrates an embodiment of operations at the sequential accessstorage device to process a prefetch request in the request queue.

FIG. 26 illustrates an embodiment of operations at the sequential accessstorage device to free space in the non-volatile storage device in thesequential access storage device.

DETAILED DESCRIPTION

FIG. 1 illustrates an embodiment of a computing environment. A pluralityof hosts 2 a, 2 b . . . 2 n may submit Input/Output (I/O) requests to astorage controller 4 over a network 6 to access data at volumes 8 (e.g.,Logical Unit Numbers, Logical Devices, Logical Subsystems, etc.) in astorage 10. The storage controller 4 includes a processor complex 12,including one or more processors with single or multiple cores, a firstcache 14, a first cache backup device 16, to backup tracks in the cache14, and a second cache 18. The first 14 and second 18 caches cache datatransferred between the hosts 2 a, 2 b . . . 2 n and the storage 10. Thefirst cache backup device 16 may provide non-volatile storage of tracksin the first cache 14. In a further embodiment, the first cache backupdevice 16 may be located in a cluster or hardware on a different powerboundary than that of the first cache 14.

The storage controller 4 has a memory 20 that includes a storage manager22 for managing the transfer of tracks transferred between the hosts 2a, 2 b . . . 2 n and the storage 10 and a cache manager 24 that managesdata transferred between the hosts 2 a, 2 b . . . 2 n and the storage 10in the first cache 14, first cache backup device 16, and the secondcache 18. A track may comprise any unit of data configured in thestorage 10, such as a track, Logical Block Address (LBA), etc., which ispart of a larger grouping of tracks, such as a volume, logical device,etc. The cache manager 24 maintains first cache management information26 and second cache management information 28 to manage read(unmodified) and write (modified) tracks in the first cache 14 and thesecond cache 18. A first cache backup device index 30 provides an indexof track identifiers to a location in the first cache backup device 16.

The storage manager 22 and cache manager 24 are shown in FIG. 1 asprogram code loaded into the memory 20 and executed by the processorcomplex 12. Alternatively, some or all of the functions may beimplemented in hardware devices in the storage controller 4, such as inApplication Specific Integrated Circuits (ASICs).

The second cache 18 may store tracks in a log structured array (LSA) 32,where tracks are written in a sequential order as received, thusproviding a temporal ordering of the tracks written to the second cache18. In a LSA, later versions of tracks already present in the LSA arewritten at the end of the LSA 32. In alternative embodiments, the secondcache 18 may store data in formats other than in an LSA.

In one embodiment, the first cache 14 may comprise a Random AccessMemory (RAM), such as a Dynamic Random Access Memory (DRAM), and thesecond cache 18 may comprise a flash memory, such as a solid statedevice, and the storage 10 is comprised of one or more sequential accessstorage devices, such as hard disk drives and magnetic tape. The storage10 may comprise a single sequential access storage device or maycomprise an array of storage devices, such as a Just a Bunch of Disks(JBOD), Direct Access Storage Device (DASD), Redundant Array ofIndependent Disks (RAID) array, virtualization device, etc. In oneembodiment, the first cache 14 is a faster access device than the secondcache 18, and the second cache 18 is a faster access device than thestorage 10. Further, the first cache 14 may have a greater cost per unitof storage than the second cache 18 and the second cache 18 may have agreater cost per unit of storage than storage devices in the storage 10.

The first cache 14 may be part of the memory 20 or implemented in aseparate memory device, such as a DRAM. In one embodiment, the firstcache backup device 16 may comprise a non-volatile backup storage (NVS),such as a non-volatile memory, e.g., battery backed-up Random AccessMemory (RAM), static RAM (SRAM), etc.

The network 6 may comprise a Storage Area Network (SAN), a Local AreaNetwork (LAN), a Wide Area Network (WAN), the Internet, and Intranet,etc.

FIG. 2 illustrates an embodiment of the first cache managementinformation 26 including a track index 50 providing an index of tracksin the first cache 14 to control blocks in a control block directory 52;an unmodified sequential LRU list 54 providing a temporal ordering ofunmodified sequential tracks in the first cache 14; a modified LRU list56 providing a temporal ordering of modified sequential andnon-sequential tracks in the first cache 14; and an unmodifiednon-sequential LRU list 58 providing a temporal ordering of unmodifiednon-sequential tracks in the first cache 14.

In certain embodiments, upon determining that the first cache backupdevice 16 is full, the modified LRU list 56 is used to destage modifiedtracks from the first cache 14 so that the copy of those tracks in thefirst cache backup device 16 may be discarded to make room in the firstcache backup device 16 for new modified tracks.

FIG. 3 illustrates an embodiment of the second cache managementinformation 28 including a track index 70 providing an index of tracksin the second cache 18 to control blocks in a control block directory72; an unmodified list 74 providing a temporal ordering of unmodifiedtracks in the second cache 18; and a spatial index 76 providing aspatial ordering of the modified tracks in the second cache 18 based onthe physical locations in the storage 10 at which the modified tracksare stored.

All the LRU lists 54, 56, 58, and 74 may include the track IDs of tracksin the first cache 14 and the second cache 18 ordered according to whenthe identified track was last accessed. The LRU lists 54, 56, 58, and 74have a most recently used (MRU) end indicating a most recently accessedtrack and a LRU end indicating a least recently used or accessed track.The track IDs of tracks added to the caches 14 and 18 are added to theMRU end of the LRU list and tracks demoted from the caches 14 and 18 areaccessed from the LRU end. The track indexes 50 and 70 and spatial index76 may comprise a scatter index table (SIT). Alternative type datastructures may be used to provide the temporal ordering of tracks in thecaches 14 and 18 and spatial ordering of tracks in the second cache 18.

Non-sequential tracks may comprise Online Line Transaction Processing(OLTP) tracks, which often comprise small block writes that are notfully random and have some locality of reference, i.e., have aprobability of being repeatedly accessed.

FIG. 4 illustrates an embodiment of a sequential access storage device100, where the storage 10 may be implemented with one or multiplesequential access storage devices 100. The sequential access storagedevice 100 includes control logic shown as the I/O manager 102, anon-volatile storage device 104 to buffer modified data, and a memory106 including a track index 108 providing an index of tracks in thenon-volatile storage device 104 to control blocks in a control blockdirectory 110; a spatial index 112 providing a spatial ordering of thetracks (both read and write) in the non-volatile storage 104 on thephysical locations in a sequential access storage medium 114 at whichthe tracks to read or write are stored; and a request queue 116 in whichread and write requests are queued. Entries in the request queue 116 mayidentify the type of request, read or write, and the requested tracks,whose location on the sequential access storage medium 114 can bedetermined from the spatial index 112. The I/O manager 102 adds read andwrite request to the request queue 112, and accesses read and writerequests from the request queue 112 to execute against a sequentialaccess medium 114. The I/O manager 102 may send commands to a read/writecontrol unit 118 that generates control signals to move one or moreactuators having read/write heads 120 to a position on the sequentialaccess storage medium 114 at which data can be read or written.

The memory 106 further includes a read priority queue 122 to buffer highpriority read requests. Lower or non-high priority read requests areadded to the request queue 116. The storage controller 4 may indicatethe priority of read requests submitted to the sequential access storagedevice 100 in a header field of the read request. In certain embodimentsread requests in the priority read queue 122 and the request queue 116are read based on a temporal order, or order in which they were added tothe queues 116 and 122, where the queues may comprise LRU queues.Destage requests are added to the request queue 116 based on a temporalorder in which write requests are received. Modified tracks in thenon-volatile storage device 104 are destaged based on the spatial index112 so when a destage request is processed in the request queue 116,based on the temporal order in which the destage request was added tothe request queue 116, the modified tracks in the non-volatile storagedevice 104 are selected using the spatial index 112 based on the currentposition of the read write head 120.

A buffer 124 in the device 100 may temporarily buffer read and writeinput requests and data being returned to a read request. The buffer 124may also be used to temporarily buffer modified tracks for writerequests not maintained in the non-volatile storage device, such as forsequential write requests and their modified data. The buffer 124 may bein a separate device than the non-volatile storage device 104 and maycomprise smaller storage space than available in the non-volatilestorage device 104. Alternatively, some or all of the buffer 124 may beimplemented in the non-volatile storage device.

A non-volatile storage (NVS) LRU list 126 provides an LRU queue fortracks buffered in the non-volatile storage device 104, includingmodified tracks to write to the sequential access storage medium 114 andprefetch tracks. The NVS LRU list 126 may be used to determine tracks toremove from the non-volatile storage device 104 if space needs to befreed in the non-volatile storage device 104.

The sequential access storage medium 114 may comprise one or more harddisk drive platters for a hard disk drive device or magnetic tape. Incertain embodiments, the non-volatile storage device 104 may comprise aflash memory device comprised of solid state storage. In certainembodiments, the non-volatile storage device 104, e.g., flash memory, isimplemented on the sequential access storage device 100 circuit boardwithin the enclosure including the sequential access storage device 100components. For instance, the may comprise an 8 GB flash memory device.

Some or all of the functions of the I/O manager 102 may be implementedas code executed by a processor in the sequential access storage device100. Alternatively, some or all of the functions of the I/O manager 102may be implemented in an ASIC on the sequential access storage device100.

FIG. 5 illustrates an embodiment of a first cache control block 150entry in the control block directory 52, including a control blockidentifier (ID) 152, a first cache location 154 of the physical locationof the track in the first cache 14, information 156 indicating whetherthe track is modified or unmodified, and information 158 indicatingwhether the track is a sequential or non-sequential access.

FIG. 6 illustrates an embodiment of a second cache control block 160entry in the second cache control block directory 72, including acontrol block identifier (ID) 162 and an LSA location 164 where thetrack is located in the LSA 32. In certain embodiments, the second cachecontrol block 160 may further include a prefetch flag 166 indicatingwhether the track is for a pre-fetch operation and an LRU count 168indicating a number of times the track has been placed at the mostrecently used (MRU) end of the unmodified LRU list 74 while in thesecond cache 18. In certain embodiments, tracks that are read from thestorage 10 as part of a prefetch operation may be maintained in thesecond cache 18 longer by moving an indicator for the track in thesecond cache 18 multiple times to the MRU end of the unmodified LRU list74 for a predetermined number of times, before being removed to freespace. The unmodified LRU list 74 may identify unmodified non-sequentialtracks demoted from the first cache 14 and promoted to the second cache18 and pre-fetch tracks read from the storage 10 to pre-fetch forsubsequent operations.

FIG. 7 illustrates an embodiment of a non-volatile storage control block170 entry in the non-volatile storage 104 control block directory 110,including a control block identifier (ID) 172 and a physical location174 at which the track is located, such as an LSA location if the trackis stored in a LSA on the non-volatile storage device. In certainembodiments, the non-volatile storage control block 170 may include aprefetch flag 176 indicating whether the track was read from thesequential access storage medium 114 and placed in the non-volatilestorage device 104 as part of a prefetch operation; an LRU count 178indicating a number of times the track has been placed at the mostrecently used (MRU) end of the unmodified LRU list 74 while in thenon-volatile storage device 104; and a modified flag 180 indicatingwhether the track has modified data to write to the sequential accessstorage medium 114. In certain embodiments, tracks that are read fromthe sequential access storage medium 114 as part of a prefetch operationmay be maintained in the non-volatile storage device 104 longer bymoving an indicator for the track in the second cache 18 multiple timesto the MRU end of the unmodified LRU list 74 for a predetermined numberof times, before being removed to free space. Further, a track in thenon-volatile storage device 104 may be both a modified track to destageand a prefetch track.

FIG. 8 illustrates a spatial index entry 180 including a trackidentifier 182 of a track in the non-volatile storage device 104 and thephysical location 184 of where the track to read or write is stored inthe sequential access storage medium 114, such as a cylinder, platternumber, angular position on the cylinder, etc.

FIG. 9 illustrates an embodiment of operations performed by the cachemanager 24 to demote unmodified tracks from the first cache 14. Thedemote operation may be initiated upon determining to free space in thefirst cache 14. Upon initiating (at block 200) an operation to determinewhether to remove tracks from the first cache 14 to accommodate tracksbeing added to the first cache 14, the cache manager 24 determines (atblock 202) whether to demote non-sequential or sequential unmodifiedtracks based on expected hits to different types of unmodified tracks.If (at block 204) the determination is to demote unmodified sequentialtracks, then the cache manager 24 uses (at block 206) the unmodifiedsequential LRU list 54 to determine unmodified sequential tracks todemote, from the LRU end of the list, which are not promoted to thesecond cache 18. If (at block 204) the determination is made to demoteunmodified non-sequential tracks, then the cache manager 24 uses theunmodified non-sequential LRU list 58 to determine (at block 208)unmodified non-sequential tracks to demote. The unmodifiednon-sequential tracks are promoted (at block 210) to the second cache18.

FIG. 10 illustrates an embodiment of operations performed by the cachemanager 24 to destage modified tracks from the first cache 14. The cachemanager 24 may regularly destage tracks as part of scheduled operationsand increase the rate of destages if space is needed in the first cachebackup device 16. Upon initiating (at block 250) the operation todestage modified tracks, the cache manager 24 processes (at bock 252)the modified LRU list 56 to determine modified tracks to destage, fromthe LRU end of the LRU list 56. The cache manager 24 writes (at block254) the determined modified tracks (sequential or non-sequential) tothe storage 10, bypassing the second cache 18. The cache manager 24discards (at block 260) the copy of the destaged modified tracks fromthe first cache backup device 16.

With the operations of FIGS. 9 and 10, non-sequential tracks are demotedbut not promoted to the second cache 18. Modified tracks (writes) arewritten directly to the storage 10, bypassing the second cache.Sequential unmodified tracks (reads) are discarded and not copiedelsewhere, and unmodified non-sequential tracks demoted from the firstcache 14 are promoted to the second cache 18.

FIG. 11 illustrates an embodiment of operations performed by the cachemanager 24 to add, i.e., promote, a track to the first cache 14, whichtrack may comprise a write or modified track from a host 2 a, 2 b . . .2 n, a non-sequential track in the second cache 18 that is subject to aread request and as a result moved to the first cache 14, or readrequested data not found in either cache 14 or 18 and retrieved from thestorage 10. Upon receiving (at block 300) the track to add to the firstcache 14, the cache manager 24 creates (at block 301) a control block150 (FIG. 5) for the track to add indicating the 154 location in thefirst cache 14 and whether the track is modified/unmodified 156 andsequential/non-sequential 158. This control block 150 is added to thecontrol block directory 52 of the first cache 14. The cache manager 24adds (at block 302) an entry to first cache track index 50 having thetrack ID of track to add and an index to the created cache control block150 in the control block directory 52. An entry is added (at block 304)to the MRU end of the LRU list 54, 56 or 58 of the track type of thetrack to add. If (at block 306) the track to add is a modifiednon-sequential track, then the track to add is also copied (at block308) to the first cache backup device 16 and an entry is added to thefirst cache backup device index 30 for the added track. If (at block306) the track to add is unmodified sequential, control ends.

FIG. 12 illustrates an embodiment of operations performed by the cachemanager 24 to promote an unmodified non-sequential track to the secondcache 18 that is being demoted from the first cache 14. Upon initiating(at block 350) the operation to promote a track to the second cache 18,the cache manager 24 adds (at block 352) the track being promoted to theLSA 32 in the second cache 18 and creates (at block 354) a control block160 (FIG. 6) for the track to add indicating the track location 164 inthe LSA 32. An entry is added (at block 356) to the second cache trackindex 70 having the track ID of the promoted track and an index to thecreated cache control block 160 in the control block directory 72 forthe second cache 18. The cache manager 24 indicates (at block 360) thepromoted track at the MRU end of the unmodified LRU list 74, such as byadding the track ID to the MRU end.

The cache manager 12 may use the second cache 18 as a read-only cachefor only unmodified sequential tracks. Modified sequential andnon-sequential tracks are written directly to the sequential accessstorage device 100 and the non-volatile storage device 104 in thesequential access storage device 100 provides a write cache for modifiednon-sequential tracks.

FIG. 13 illustrates an embodiment of operations performed by the cachemanager 24 to free space in the second cache 18 for new tracks to add tothe second cache 18, i.e., tracks being demoted from the first cache 14.Upon initiating this operation (at block 400) the cache manager 24determines (at block 402) unmodified tracks in the second cache 18 fromthe LRU end of the unmodified LRU list 74. If (at block 406) thedetermined unmodified track is not a prefetch track, as indicated byprefetch flag 166, then the track is discarded (at block 408). If (atblock 406) the track to destage is a prefetch track and if (at block410) the LRU count 160 of the prefetch track is a predetermined value,then control proceeds to block 408 to discard the prefetch track, evenif it has not yet been accessed by a read operation to access theprefetch track. Otherwise, if the LRU count 168 is not the predeterminedvalue, then the cache manager 24 moves (at block 412) an indicator forthe prefetch track to a most recently used (MRU) end of the unmodifiedLRU list 74 and increments the LRU count 168 of the prefetch track. Inthis way, a prefetch track in the second cache 18 goes through theunmodified LRU list 74 a predetermined number of times before beingremoved from the second cache 18 to free space. This leaves the prefetchtrack in the second cache 18 longer to be available for a read request.

FIG. 14 illustrates an embodiment of operations performed by the cachemanager 24 to retrieve requested tracks for a read request from thecaches 14 and 18 and storage 10. The storage manager 22 processing theread request may submit requests to the cache manager 24 for therequested tracks. Upon receiving (at block 450) the request for thetracks, the cache manager 24 uses (at block 454) the first cache trackindex 50 to determine whether all of the requested tracks are in thefirst cache 14. If (at block 454) all requested tracks are not in thefirst cache 14, then the cache manager 24 uses (at block 456) the secondcache track index 70 to determine any of the requested tracks in thesecond cache 18 not in the first cache 14. If (at block 458) there areany requested tracks not found in the first 14 and second 18 caches,then the cache manager 24 determines (at block 460) any of the requestedtracks in the storage 10, from the second cache track index 70, not inthe first 14 and the second 18 caches. The cache manager 24 thenpromotes (at block 462) any of the determined tracks in the second cache18 and the storage 10 to the first cache 14. The cache manager 24 uses(at block 464) the first cache track index 50 to retrieve the requestedtracks from the first cache 14 to return to the read request. Theentries for the retrieved tracks are moved (at block 466) to the MRU endof the LRU list 54, 56, 58 including entries for the retrieved tracks.With the operations of FIG. 13, the cache manager 24 retrieves requestedtracks from a highest level cache 14, then second cache 18 first beforegoing to the storage 10, because the caches 14 and 18 would have themost recent modified version of a requested track. The most recentversion is first found in the first cache 14, then the second cache 18if not in the first cache 14 and then the storage 10 if not in eithercache 14, 18.

With the operations of FIG. 14, the cache manager 24 gathers requestedtracks from a highest level cache 14 (first cache device), then thesecond cache 18 (second cache device) before going to the storage 10,because the caches 14 and 18 would provide the fastest access torequested tracks and the first cache 14 provides the most recentmodified version of a requested track.

FIG. 15 illustrates an embodiment of operations performed by the I/Omanager 102 at the sequential access storage device 100 to process awrite request with modified tracks for the sequential access storagemedium 114. Upon receiving (at block 500) the write request, the I/Omanager 102 adds (at block 502) the received modified tracks to thenon-volatile storage device 104, which operates as a second cache deviceto the first cache 14. In one embodiment, the tracks may be added to anLSA in the non-volatile storage device 104 or stored in another formatin the device 104. The I/O manager 102 creates (at block 504) a cachecontrol block 170 (FIG. 7) for each received modified track indicating alocation 174 in the non-volatile storage device 104 (e.g., LSA location)of the modified track. The modified flag 180 in the cache control block170 for the added modified track is set to indicate the track ismodified. An entry is added (at block 506) to the track index 108 havingthe track ID of modified track in the non-volatile storage device 104and index to the created control block 170.

The I/O manager 102 determines (at block 508) a physical location ofwhere the modified track is stored on the sequential access storagemedium 114, such as a cylinder on the media. Further, in an additionalembodiment, the determined physical location included in the spatialindex 112 may also include an angular position on the cylinder of themodified track (also referred to as the sector). The I/O manager 102adds (at block 510) an entry to the spatial index 112 indicating thetrack ID 182 of the modified track and the determined physical location184 of the modified on the sequential access storage medium 114. The I/Omanager 102 further adds (at block 512) a destage request to the requestqueue 116 for each track to write. This destage request may not identifythe specific modified track to demote, which is later determined usingan algorithm to reduce the total access time to perform the write.

FIG. 16 illustrates an embodiment of operations performed by the I/Omanager 102 at the sequential access storage device 100 to process aread request directed to tracks in the sequential access storage medium114. Upon receiving (at block 520) the read request, the I/O manager 102determines (at block 524) whether all the requested tracks are in thenon-volatile storage device 104. If not (from the no branch of block524) and if (at block 526) the priority of the request is high, then theread request is added (at block 528) to the priority read queue 122.Otherwise, if (from the no branch of block 526) the priority is nothigh, then the read request is added (at block 530) to the request queue116. If (at block 524) all the requested tracks are in the non-volatilestorage device 104, then the requested tracks are read (at block 532)from the non-volatile storage device 104 and returned to the readrequest. If (at block 534) the modified flag 180 for the read modifiedtracks indicates that the read tracks are modified, then the I/O manager102 sets (at block 536) the pre-fetch flag 176 in the control block toindicate that the read tracks are not prefetch tracks because theprefetch tracks have just been read, indicating the read intended forthe prefetch tracks has likely been performed. However, these tracks aremaintained in the non-volatile storage device 104 if they are modifiedand need to be destaged to the sequential access storage medium 114. If(at block 534) the read tracks are not modified, then the read prefetchtracks are discarded (at block 538) to free space in the non-volatilestorage device 104.

FIG. 17 illustrates an embodiment of operations performed by the I/Omanager 102 to process a request in one of the queues 116 and 122 aftercompleting the processing of a request in the priority read queue 122,the request queue 116 or a destage request processed as part of anoperation to free space to the non-volatile storage device 104. Uponinitiating (at block 550) the operation to process a request in one ofthe queues 116, 122, the I/O manager 102 determines (at block 552) ifthere is a pending destage operation to free space in the non-volatilestorage device 100. If so (at block 552), then the I/O manager 102suspends (at block 554) processing of requests in the request queue 116and the priority read queue 122 until the free space operation completesas described with respect to FIG. 26. If (at block 552) there is nopending destage operation to free space or after unsuspending processingthe request queue after freeing space (from block 554), if (at block556) the priority read queue 122 is empty, then control proceeds (atblock 558) to block 600 in FIG. 18 to process the request queue 116. Ifthe priority read queue 122 has pending requests, then the I/O manager104 determines (at block 560) whether a consecutive first predeterminednumber of read requests in the priority read queue have just beenprocessed to prevent starvation at the request queue 116. If (at block560) the I/O manager 104 has not just completed processing theconsecutive first predetermined number of high priority read requests,then the I/O manager 104 processes (at block 562) a read request in thepriority read queue 122, such as from the MRU end of the priority readqueue 122, to read the requested data from the non-volatile storagedevice 104 or the sequential access storage medium 114 to return to theread request.

If (at block 560) the I/O manager 104 has completed processing theconsecutive first predetermined number of high priority read requestsfrom the priority read queue 122, then control proceeds (at block 564)to block 600 in FIG. 18 to process a second predetermined number of readand write requests in the request queue 116 to avoid starvation at therequest queue 116.

In the described embodiments of FIG. 17, a destage operation isperformed before a high priority read request. In an alternativeembodiment, a high priority read request from the priority read queue122 may have priority over destage operations to free space in thenon-volatile storage device 104. In a further alternative embodiment, ahigh priority read request and a destage operation may be combined toperform as part of the same disk operation.

FIG. 18 illustrates an embodiment of operations performed by the I/Omanager 102 to process the request queue 116 which may be continuallyrepeated while requests are queued in the request queue 116. Uponinitiating (at block 600) the processing of the request queue 116, theI/O manager 102 compares (at block 602) a current position of theread/write head 120 with respect to the sequential access storage medium114 to physical locations (e.g., cylinder and angular position) of thetracks indicated in the spatial index 112 and otherwise determined onthe sequential access storage medium. The spatial index 112 may includeall the necessary information to determine the track to read or write inclosest temporal proximity to the read/write 120 head, such as thecylinder and angular position of the track to read or write, or mayinclude only some of the information, e.g., the cylinder, and the restof the physical location information needed may be determined from theread/write control unit 118. The I/O manager 102 selects (at block 604),based on the comparison, a track that can be read or written in aminimal time from the current position of the read/write head 120.

If (at block 606) the selected track is for a prefetch request of tracksto prefetch, then control proceeds (at block 608) to block 870 in FIG.25. If (at block 610) the selected track is a modified track for aqueued write request in the request queue 116, then the I/O manager 102writes (at block 612) the selected modified track to the sequentialaccess storage medium 114. If (at block 614) the pre-fetch flag 176 ofthe written track is set to indicate that the track is also a prefetchtrack, then the modified flag 180 is set (at block 616) to indicate thatthe track is not modified, but the prefetch track remains in thenon-volatile storage device 104 for access. If (at block 614) thewritten tracks is not also a prefetch track, then the destaged modifiedtrack is discarded (at block 618) from the non-volatile storage device104. If (at block 610) the selected track is for a read request, thenthe I/O manager 102 retrieves (at block 620) any of the requested tracksin the non-volatile storage device 104 to return to the read request. If(at block 622) there are requested tracks not in the non-volatilestorage device 104, then the I/O manager 102 reads (at block 624) therequested tracks not in the non-volatile storage device 104 from thesequential access storage medium 114. After gathering all the requestedread data (from block 624 or from the no branch of block 622), the I/Omanager 102 returns (at block 626) the retrieved requested tracks to thestorage controller 4 without caching the read requested tracks in thenon-volatile storage 104.

In an embodiment, where the sequential access storage device 100comprises a hard disk drive and the sequential access storage medium 114comprises a magnetic disk, the spatial index indicates a cylinder of thetrack on magnetic disk. To determine the track that can be accessed inthe minimal time from the current position of the read/write head 120,the I/O manager 102 may analyze the cylinder and angular position of thetracks to read or write in the spatial index 112 to estimate the timesfor the read/write head 120 to seek to the cylinders of the tracks androtate the disk under the read/write head 120 to reach the angularpositions of the requested tracks. The I/O manager may then select amodified track having a minimal of the estimated access times.

In a further embodiment the sequential access storage device 114 maycomprise a hard disk drive having multiple disk platters and multiplewrite heads to write to each platter. The I/O manager 102 may determinethe estimated time to seek and rotate to each modified track on eachdisk platter from the current position of the write heads to select amodified track having the minimal estimated time to access across thedisk platters.

In an alternative, lower priority requests in the request queue 116 maybe processed according to a temporal ordering, not just a spatialordering of the requested tracks.

In addition, if the I/O manager 104 determines that a destage operationneeds to be performed to destage modified tracks in the non-volatilestorage device 104 to the sequential access storage medium 114 to freespace in the non-volatile storage medium 104, then the destage operationmay interrupt the processing of the requests in the priority read queue122 and the request queue 116.

FIG. 19 illustrates an embodiment of operations performed by the storagemanager 22 in the storage controller 4 to prefetch data in thesequential access storage device 104 needed for a later operation. Inresponse to initiating (at block 700) the prefetch command, the storagemanager 22 sends (at block 702) a prefetch request to the sequentialaccess storage device 100 to prefetch tracks in the sequential accessstorage device. In one embodiment, the prefetch request causes thesequential access storage device 100 to cache the prefetch tracks in thenon-volatile storage device 104 within the sequential access storagedevice 100.

FIG. 20 illustrates an embodiment of a prefetch request 720, including aprefetch request 722 operation code, a track address 724 indicating astarting track in the sequential access storage medium 114 at which tostart prefetching, and a transfer length 726 indicating a start of theprefetch.

FIG. 21 illustrates an embodiment of operations performed by the storagemanager 22 to access the prefetch data prefetched by the prefetchrequest 720. Upon initiating (at block 740) an operation to access theprefetch tracks, the storage manager 22 of the storage controller 4generates (at 742) a read request to read the prefetch tracks followingthe sending of the prefetch command. The storage manager 22 transmits(at block 744) the read request to the sequential access storage device100 to read the prefetch tracks. In one embodiment, the read request toread the prefetch tracks from the sequential access storage device 100may comprise a high priority read request.

In described embodiments, the prefetch request is designated to beprocessed at a lower priority than the read request. The prefetchrequest is added to the request queue 116, where it is processedaccording to a spatial ordering of the read and write tracks in therequest queue 116. Whereas, if the read request is to be processedagainst the sequential access storage medium 114, such as the case ifthe prefetch tracks were not in the non-volatile storage device 104,then the read request would be processed at a higher priority based on atemporal ordering of the read requests in the priority read queue 122 asdescribed with respect to FIG. 17, which provides higher priorityprocessing over the spatial ordering processing of the request queue116. For instance, an application or process operating at a highpriority may anticipate the need for certain tracks at a later time foran operation, so can prefetch those tracks at a lower priority than thehigh priority at which the application/process is operating. However,when the application/process eventually needs the data and issues a readrequest for the tracks that were prefetched, the read request is at thehigh priority at which the application is operating.

FIGS. 22 and 23 illustrate an alternative embodiment where the storagemanager 22 issues the prefetch request to the sequential access storagedevice 100 to prefetch tracks to the second cache 18 and then issues theread request to access the prefetch tracks from the second cache 18 topromote to the first cache 14 to use. In the embodiment of FIGS. 22 and23, the sequential access storage device 100 may not have a non-volatilestorage device 104, and the second cache device resides in the storagecontroller 4 as the second cache 18. With respect to FIG. 22, toinitiate (at block 800) the operation to prefetch tracks needed for alater operation, the storage manager 22 sends (at block 802) a prefetchrequest to the sequential access storage device 100 to prefetch tracksin the sequential access storage medium 114. Upon receiving (at block804) the prefetch tracks from the sequential access storage device 100in response to the prefetch request, the storage manager 22 stores (atblock 806) the prefetch tracks in the second cache 18.

FIG. 23 illustrates an embodiment of operations performed by the storagemanager 22 and/or cache manager 24 to access the prefetch tracks. Uponimitating (at block 820) the operation to read the prefetch tracks, thestorage manager 22 generates (at block 822) a read request to read theprefetch tracks following the sending of the prefetch command. The cachemanager 24 (or storage manager 22) may process the read request bydetermining (at block 824) whether the prefetch tracks are in the secondcache 18. If not (from the no branch of block 824), the cache manager 24transmits (at block 826) the read request to the sequential accessstorage device 100 and stores (at block 828) the prefetch tracksreturned for the read request from the sequential access storage device100 in response to the read request in the first cache 14. If (from theyes branch of block 824) the prefetch tracks are in the second cache 18,the cache manager 24 promotes (at block 830) the prefetch tracks fromthe second cache 18 to the first cache 14 to be available for use by anapplication.

The prefetch and read operations of FIGS. 19 and 21 are directed to asequential access storage device 100 that includes a non-volatilestorage device 104, which operates as the second cache device to thefirst cache 14, such as shown in FIG. 4. The prefetch and readoperations of FIGS. 22 and 23 may be directed to a sequential accessstorage device that may not have a non-volatile storage device forcaching because in FIGS. 22 and 23, the caching of the prefetch tracksis performed in the second cache 18 (second cache device) in the storagecontroller 4.

FIG. 24 illustrates an embodiment of operations performed by the I/Omanager 102 in the sequential access storage device 100 to process aprefetch request 720 (FIG. 20). Upon receiving (at block 850) a prefetchrequest 720 indicating prefetch tracks in the sequential access storagemedium 114, the I/O manager 102 adds (at block 852) a prefetch requestto the request queue 116 to read the prefetch tracks. A single prefetchfor all prefetch tracks may be added for all the tracks to prefetch orone prefetch request may be added for each prefetch track.

FIG. 25 illustrates an embodiment of operations performed by the I/Omanager 102 to process a prefetch request in the request queue 116 fromblock 608 in FIG. 18. Upon processing (at block 870) the selected one ormore tracks for the prefetch request in the request queue 116, the I/Omanager 102 determines (at block 872) whether the selected prefetchtrack is in the non-volatile storage device 104. If so (from the yesbranch of bock 872), the I/O manager 102, sets (at block 874) theprefetch flag 176 in the control block for each prefetch track alreadyin the non-volatile storage device 104 to indicate a prefetch track. If(from the no branch of block 872) some or all of the prefetch tracks arenot in the non-volatile storage device 104, then the I/O manager 102reads (at block 876) any of the prefetch tracks not in the non-volatilestorage device 104 from the sequential access storage medium 114 andadds (at block 878) the read prefetch tracks to the non-volatile storagedevice 104 and sets the control block prefetch flag 176 for the prefetchtracks to indicate a prefetch track.

FIG. 26 illustrates an embodiment of operations performed by the I/Omanager 102 to free space in the non-volatile storage device 104. Uponinitiating (at block 900) an operation to free space, the I/O manager102 determines (at block 902) from the non-volatile storage (NVS) LRUlist 126 a track to remove from the non-volatile storage device 104. If(at block 904) the track has modified data, as indicated by the modifiedflag 180, then the modified track is written (at block 906) to thesequential access storage medium 114 and the modified flag 180 is set(at block 908) to indicate the track as unmodified. If (at block 904)the track is not modified data or after writing the track (from block908), a determination is made (at block 910) whether the prefetch flag178 is set, i.e., the track is a prefetch track. If (at block 910) theselected track is not a prefetch track, then the I/O manager 102discards (at block 912) the track in the non-volatile storage device 104to make space available. If (at block 910) the track is a prefetchtrack, then a determination (at block 914) is made whether the LRU count178 for the track is equal to the predetermined value, maximum number oftimes through the LRU list 126. If (at block 914) the LRU count 178 isthe predetermined value, control proceeds to block 912 to discard thetrack. Otherwise, if the LRU count 178 is not the predetermined value,then the LRU count 178 for the track is incremented (at block 916) andthe indicator for the track is moved (at block 918) to the MRU end ofthe NVS LRU list 126.

Described embodiments provide techniques for allowing the use of asecond level cache device between a primary or first level cache deviceand a storage to store prefetch tracks from the storage to makeavailable for a subsequent read request to provide faster access than ifthe tracks were retrieved from the sequential access storage device whenneeded.

Described embodiments further provide a non-volatile storage device 104,such as a flash memory, in the sequential access storage device 100 tooperate as a second cache device and provide caching of modified tracksand prefetch tracks, where read requests to the prefetch tracks can bereturned from the non-volatile storage device 104 with faster accessthan if returned from the sequential access medium 114 to improve readperformance when the tracks are needed. Further, write performance maybe improved by returning complete to the write in response to the writebeing stored in the non-volatile storage device 104 before beingdestaged to the sequential access storage medium 114.

Further benefits are realized by allowing priority indication of readrequests so that high priority read requests and the prefetch requestswill not be unduly delayed in being processed as a result of operationsto destage modified tracks to the sequential access storage medium 114.In this way, high priority read and prefetch requests may be processedat a higher priority than lower priority read requests and destagerequests to destage modified tracks for write requests cached in thenon-volatile storage device 104.

Further, with the described embodiments, the lower priority readrequests in the request queue are processed based on a spatial orderingof the received lower priority read requests and destage requests forwrite requests in the request queue. High priority read and prefetchrequests are processed based on a temporal ordering of the received highpriority read requests. However, modified tracks for write requests andlow priority read requests are processed based on a spatial ordering ofthe write requests, low priority read requests, and a current positionof the read/write head 120 to optimize the seek and latency delays forthe read and write requests.

The described operations may be implemented as a method, apparatus orcomputer program product using standard programming and/or engineeringtechniques to produce software, firmware, hardware, or any combinationthereof. Accordingly, aspects of the embodiments may take the form of anentirely hardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module” or “system.” Furthermore,aspects of the embodiments may take the form of a computer programproduct embodied in one or more computer readable medium(s) havingcomputer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described above with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The terms “an embodiment”, “embodiment”, “embodiments”, “theembodiment”, “the embodiments”, “one or more embodiments”, “someembodiments”, and “one embodiment” mean “one or more (but not all)embodiments of the present invention(s)” unless expressly specifiedotherwise.

The terms “including”, “comprising”, “having” and variations thereofmean “including but not limited to”, unless expressly specifiedotherwise.

The enumerated listing of items does not imply that any or all of theitems are mutually exclusive, unless expressly specified otherwise.

The terms “a”, “an” and “the” mean “one or more”, unless expresslyspecified otherwise.

Devices that are in communication with each other need not be incontinuous communication with each other, unless expressly specifiedotherwise. In addition, devices that are in communication with eachother may communicate directly or indirectly through one or moreintermediaries.

A description of an embodiment with several components in communicationwith each other does not imply that all such components are required. Onthe contrary a variety of optional components are described toillustrate the wide variety of possible embodiments of the presentinvention.

Further, although process steps, method steps, algorithms or the likemay be described in a sequential order, such processes, methods andalgorithms may be configured to work in alternate orders. In otherwords, any sequence or order of steps that may be described does notnecessarily indicate a requirement that the steps be performed in thatorder. The steps of processes described herein may be performed in anyorder practical. Further, some steps may be performed simultaneously.

When a single device or article is described herein, it will be readilyapparent that more than one device/article (whether or not theycooperate) may be used in place of a single device/article. Similarly,where more than one device or article is described herein (whether ornot they cooperate), it will be readily apparent that a singledevice/article may be used in place of the more than one device orarticle or a different number of devices/articles may be used instead ofthe shown number of devices or programs. The functionality and/or thefeatures of a device may be alternatively embodied by one or more otherdevices which are not explicitly described as having suchfunctionality/features. Thus, other embodiments of the present inventionneed not include the device itself.

The illustrated operations of FIGS. 9-19 and 21-26 show certain eventsoccurring in a certain order. In alternative embodiments, certainoperations may be performed in a different order, modified or removed.Moreover, steps may be added to the above described logic and stillconform to the described embodiments. Further, operations describedherein may occur sequentially or certain operations may be processed inparallel. Yet further, operations may be performed by a singleprocessing unit or by distributed processing units.

The foregoing description of various embodiments of the invention hasbeen presented for the purposes of illustration and description. It isnot intended to be exhaustive or to limit the invention to the preciseform disclosed. Many modifications and variations are possible in lightof the above teaching. It is intended that the scope of the invention belimited not by this detailed description, but rather by the claimsappended hereto. The above specification, examples and data provide acomplete description of the manufacture and use of the composition ofthe invention. Since many embodiments of the invention can be madewithout departing from the spirit and scope of the invention, theinvention resides in the claims herein after appended.

What is claimed is:
 1. A computer program product for managing data in asequential access storage device receiving read requests and writerequests from a system with respect to tracks stored in a sequentialaccess storage medium, the computer program product comprising acomputer readable storage medium having computer readable program codeembodied therein that executes to perform operations, the operationscomprising: receiving a prefetch request from the system indicatingprefetch tracks in the sequential access storage medium; processing theprefetch request to read the prefetch tracks from the sequential accessstorage medium; caching the accessed prefetch tracks in a non-volatilestorage device integrated with the sequential access storage device,wherein the non-volatile storage device is a faster access device thanthe sequential access storage medium; receiving a read request for theprefetch tracks following the caching of the prefetch tracks, whereinthe prefetch request is designated to be processed at a lower prioritythan the read request with respect to the sequential access storagemedium; and returning the prefetch tracks from the non-volatile storagedevice to the read request.
 2. The computer program product of claim 1,wherein the operations further comprise: determining whether theprefetch tracks in the read request are in the non-volatile storagedevice in response to receiving the read request, wherein the requestedtracks are returned from the non-volatile storage device in response tothe read request; reading the prefetch tracks in the read request fromthe sequential access storage device in response to determining that therequested tracks are not located in the non-volatile storage device; andreturning the prefetch tracks read from the sequential access storagedevice to the read request.
 3. The computer program product of claim 2,wherein the operations further comprise: queueing the prefetch requestin a request queue in response to receiving the prefetch request,wherein the read to the sequential access storage device for the readrequest is processed at a higher priority than the read for the prefetchrequest.
 4. The computer program product of claim 3, wherein theoperations further comprise: caching received modified tracks for writerequests in the non-volatile storage device; and adding a destagerequest to the request queue for received write requests having modifiedtracks for the sequential access storage medium cached in thenon-volatile storage device.
 5. The computer program product of claim 3,wherein the request queue queues read requests having a first priority,wherein the operations further comprise: maintaining a priority readqueue queuing read requests having a second priority, wherein readrequests having the second priority are accessed from the priority readqueue, wherein processing of the read requests in the priority readqueue has higher priority than processing requests in the request queue;adding the read request for the prefetch tracks to the priority readqueue in response to determining that the prefetch tracks are notlocated in the non-volatile storage device, wherein the prefetch tracksof the read request are read according to an ordering of read requestsin the priority read queue; and returning the prefetch tracks to theread request in response to accessing the prefetch tracks whenprocessing the read request without caching the prefetch tracks in thenon-volatile storage device.
 6. The computer product of claim 1, whereinthe prefetch request is designated to be processed according to aspatial ordering of tracks to read and write on the sequential accessstorage medium and wherein the read request is designated to beprocessed according to a temporal ordering of when the read request wasreceived.
 7. A computer program product for requesting data from asequential access storage device, the computer program productcomprising a computer readable storage medium having computer readableprogram code embodied therein that executes to perform operations, theoperations comprising: sending a prefetch request to the sequentialaccess storage device to prefetch tracks in the sequential accessstorage device to a first non-volatile storage device, wherein theprefetch request is designated to be processed in the sequential accessstorage device at a first priority; generating a read request to readthe prefetch tracks following the sending of the prefetch request,wherein the read request is designated to be processed at a secondpriority at the sequential access storage device, wherein the firstpriority has a lower priority processing in the sequential accessstorage device than the higher priority; and storing the read tracksreturned to the read request from the first non-volatile storage devicein a second non-volatile storage device.
 8. The computer program productof claim 7, wherein the first and the second non-volatile storagedevices are in a storage controller external to the sequential accessstorage device, wherein the operations further comprise: processing theread request to determine whether the prefetch tracks are in the firstnon-volatile storage device; promoting the prefetch tracks from thefirst non-volatile storage device to the second non-volatile storagedevice in response to determining that the prefetch tracks are in thefirst non-volatile storage device; and transmitting the read request tothe sequential access storage device in response to determining that theprefetch tracks are not in the first non-volatile storage device.
 9. Thecomputer program product of claim 7, wherein the first non-volatilestorage device is within the sequential access storage device and thesecond non-volatile storage device is in storage controller external tothe sequential access storage device.
 10. The computer program productof claim 7, wherein the second non-volatile storage device is a fasteraccess device than the first non-volatile storage device.
 11. Thecomputer program product of claim 7, wherein the operations furthercomprise: initiating an operation to remove unmodified tracks in thefirst non-volatile storage device cache to free space in the firstnon-volatile storage device; determine an unmodified track at a LeastRecently Used (LRU) end of an unmodified LRU list; determine whether thedetermined unmodified track comprises a prefetch track; determiningwhether a counter of the prefetch track is at a predetermined value;removing the determined unmodified tracks from the first non-volatilestorage device in response to determining that the unmodified track isnot the prefetch track or in response to determining that the counter ofthe prefetch track is at the predetermined value; and moving theprefetch track to a most recently used (MRU) end of the LRU list andincrementing the counter of the prefetch track in response todetermining that the counter is less than the predetermined value.
 12. Asequential access storage device receiving read requests and writerequests from a system with respect to tracks, comprising: a sequentialaccess storage medium storing tracks of data; a non-volatile storagedevice; a computer readable storage medium having an Input/Output (I/O)manager executed to perform operations, the operations comprising:receiving a prefetch request from the system indicating prefetch tracksin the sequential access storage medium; processing the prefetch requestto read the prefetch tracks from the sequential access storage medium;caching the accessed prefetch tracks in the non-volatile storage deviceintegrated with the sequential access storage device, wherein thenon-volatile storage device is a faster access device than thesequential access storage medium; receiving a read request for theprefetch tracks following the caching of the prefetch tracks, whereinthe prefetch request is designated to be processed at a lower prioritythan the read request with respect to the sequential access storagemedium; and returning the prefetch tracks from the non-volatile storagedevice to the read request.
 13. The sequential access storage device ofclaim 12, wherein the operations further comprise: determining whetherthe prefetch tracks in the read request are in the non-volatile storagedevice in response to receiving the read request, wherein the requestedtracks are returned from the non-volatile storage device in response tothe read request; reading the prefetch tracks in the read request fromthe sequential access storage device in response to determining that therequested tracks are not located in the non-volatile storage device; andreturning the prefetch tracks read from the sequential access storagedevice to the read request.
 14. The sequential access storage device ofclaim 13, wherein the operations further comprise: queueing the prefetchrequest in a request queue in response to receiving the prefetchrequest, wherein the read to the sequential access storage device forthe read request is processed at a higher priority than the read for theprefetch request.
 15. The sequential access storage device of claim 14,wherein the request queue queues read requests having a first priority,wherein the operations further comprise: maintaining a priority readqueue queuing read requests having a second priority, wherein readrequests having the second priority are accessed from the priority readqueue, wherein processing of the read requests in the priority readqueue has higher priority than processing requests in the request queue;adding the read request for the prefetch tracks to the priority readqueue in response to determining that the prefetch tracks are notlocated in the non-volatile storage device, wherein the prefetch tracksof the read request are read according to an ordering of read requestsin the priority read queue; and returning the prefetch tracks to theread request in response to accessing the prefetch tracks whenprocessing the read request without caching the prefetch tracks in thenon-volatile storage device.
 16. The system of claim 14, wherein theoperations further comprise: caching received modified tracks for writerequests in the non-volatile storage device; and adding a destagerequest to the request queue for received write requests having modifiedtracks for the sequential access storage medium cached in thenon-volatile storage device.
 17. The sequential access storage device ofclaim 12, wherein the prefetch request is designated to be processedaccording to a spatial ordering of tracks to read and write on thesequential access storage medium and wherein the read request isdesignated to be processed according to a temporal ordering of when theread request was received.
 18. A system for requesting data from asequential access storage device, comprising: a processor; and acomputer readable storage medium including code executed by theprocessor to perform operations, the operations comprising: sending aprefetch request to the sequential access storage device to prefetchtracks in the sequential access storage device to a first non-volatilestorage device, wherein the prefetch request is designated to beprocessed in the sequential access storage device at a first priority;generating a read request to read the prefetch tracks following thesending of the prefetch request, wherein the read request is designatedto be processed at a second priority at the sequential access storagedevice, wherein the first priority has a lower priority processing inthe sequential access storage device than the higher priority; andstoring the read tracks returned to the read request from the firstnon-volatile storage device in a second non-volatile storage device. 19.The system of claim 18, wherein the first and the second non-volatilestorage devices are in the system external to the sequential accessstorage device, wherein the operations further comprise: processing theread request to determine whether the prefetch tracks are in the firstnon-volatile storage device; promoting the prefetch tracks from thefirst non-volatile storage device to the second non-volatile storagedevice in response to determining that the prefetch tracks are in thefirst non-volatile storage device; transmitting the read request to thesequential access storage device in response to determining that theprefetch tracks are not in the first non-volatile storage device. 20.The system of claim 18, wherein the first non-volatile storage device iswithin the sequential access storage device and the second non-volatilestorage device is in the system external to the sequential accessstorage device.
 21. The system of claim 18, wherein the operationsfurther comprise: initiating an operation to remove unmodified tracks inthe first non-volatile storage device cache to free space in the firstnon-volatile storage device; determine an unmodified track at a LeastRecently Used (LRU) end of an unmodified LRU list; determine whether thedetermined unmodified track comprises a prefetch track; determiningwhether a counter of the prefetch track is at a predetermined value;removing the determined unmodified tracks from the first non-volatilestorage device in response to determining that the unmodified track isnot the prefetch track or in response to determining that the counter ofthe prefetch track is at the predetermined value; and moving theprefetch track to a most recently used (MRU) end of the LRU list andincrementing the counter of the prefetch track in response todetermining that the counter is less than the predetermined value. 22.The system of claim 18, wherein the second non-volatile storage deviceis a faster access device than the first non-volatile storage device.